<template>
  <n-card size="small" :title="title" content-style="padding:0px;">
    <div class="grid-box">
      <widget-item v-for="item in options" :options="item"/>
    </div>
  </n-card>
</template>
<script>
import WidgetItem from "./WidgetItem.vue";
export default {
  name: "WidgetGroup",
  components: { WidgetItem },
  props: { title: String, options: Array },
  setup() {},
  methods: {
    handleMoveEnd (evt) {
      console.log('end', evt)
    },
    handleMoveStart ({oldIndex}) {
      console.log('start', oldIndex, this.options)
    },
    handleMove () {
      return true
    },
  },
};
</script>
<style>
.grid-box {
  position: relative;
  display: grid;
  padding: 0 10px;
  grid-template-columns: [c1] 134px [c2] 134px;
  grid-template-rows: repeat(auto-fit, 20px);
  grid-gap: 10px;
  overflow: auto;
}
</style>
